<?php

namespace common\repositories\myhtsq;

use Yii;
use common\entities\myhtsq\ActionPackageEntity;
use common\repositories\BaseRepository;

class ActionPackageRepository extends BaseRepository {

    /**
     * 构造方法
     * @param unknown $config (optional)
     */
    public function __construct($config = []) {
        parent::__construct($config);
    }

    /**
     * 功能包列表
     */
    public static function getActionPackageList() {
        return ActionPackageEntity::find()->all();
    }

    /**
     * 获取授权包模型
     * @param unknown $actionPackageId
     */
    public static function getPackageModelByActionPackageId($actionPackageId) {
        return ActionPackageEntity::find()->where(['action_package_id' => $actionPackageId])->one();
    }

}
